﻿<%@ Page Language="C#" MasterPageFile="~/Medianamik/MasterPages/MedianamikModule.master" 
    AutoEventWireup="True" CodeBehind="Edit.aspx.cs" 
    Inherits="Medianamik.UI.Web.Shop.ShopEditAttributeType" ValidateRequest="false" %>
    
<%@ Register src="~/medianamik/typemanagement/Controls/IconPicker.ascx" tagname="IconPicker" tagprefix="med" %>

<asp:Content ID="ContextMenuContent" ContentPlaceHolderID="ContextMenu" runat="server">
    <asp:LinkButton ID="SaveLinkButton" runat="server" CssClass="Action BtSauvegarder" OnClick="Save" 
        Text="<%$ Resources : Medianamik_Global, SaveButtonText %>" />
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
    <asp:UpdatePanel ID="uplValidation" runat="server" UpdateMode="Always">
	    <ContentTemplate>
            <asp:ValidationSummary ID="ValidationSummary1" EnableClientScript="false" runat="server" CssClass="ValidationSummary" />
        </ContentTemplate>
    </asp:UpdatePanel><br />
    <p><med:TranslatorBox runat="server" ID="TypeNameTranslations" Required="true" ErrorMessage='<%$ Resources: medianamik_typemanagement, TranslationRequired %>' /></p><br />
    <p><label class="EditionPage"><%=Resources("medianamik_typemanagement","Icon") %></label><p><med:IconPicker ID="IconPicker" runat="server" /></p>
    <asp:UpdatePanel ID="MainUpdatePanel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
        <ContentTemplate>
            <label class="EditionPage"><%=Resources("Medianamik_TypeManagement", "DataType") %><span class="ChampObligatoire">*</span><asp:RequiredFieldValidator EnableClientScript="false" ID="reqDataType" runat="server" ControlToValidate="ddlDataTypes" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, DataTypeRequired %>" Display="None" /></label>
            <p><asp:DropDownList ID="ddlDataTypes" runat="server" CssClass="SelectList" AutoPostBack="true" OnSelectedIndexChanged="ddlDataTypes_OnSelectedIndexChanged" /></p><br />
            <asp:CustomValidator runat="server" ControlToValidate="txtRegex" OnServerValidate="ddlDataTypes_OnServerValidate" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, InvalidDataType %>" Display="None" />
            <p><asp:CheckBox ID="cbValuesAreLocalized" runat="server" Text='<%$ Resources: medianamik_typemanagement, ValuesAreLocalized %>' /></p><br />
            <asp:PlaceHolder ID="phTextValidation" runat="server">
                <p><asp:Label CssClass="EditionPage" AssociatedControlID="ddlValidation" runat="server" Text='<%$ Resources: medianamik_typemanagement, InputValidation %>' /></p>
                <asp:DropDownList ID="ddlValidation" runat="server" CssClass="SelectList" AutoPostBack="true" OnSelectedIndexChanged="ddlValidation_OnSelectedIndexChanged" />
                <asp:PlaceHolder ID="phAdvancedValidation" runat="server"><p>
                    <p><asp:Label CssClass="EditionPage" AssociatedControlID="ddlValidation" runat="server" Text='<%$ Resources: medianamik_typemanagement, Regex %>' /></p>
                    <asp:TextBox ID="txtRegex" runat="server" />
                    <asp:CustomValidator runat="server" ControlToValidate="txtRegex" OnServerValidate="txtRegex_OnServerValidate" ErrorMessage="<%$ Resources : Medianamik_TypeManagement, InvalidRegex %>" Display="None" />
                </p></asp:PlaceHolder>
                <p><asp:Label CssClass="EditionPage" AssociatedControlID="ddlValidation" runat="server" Text='<%$ Resources: medianamik_typemanagement, TextMinLength %>' /></p>
                <asp:TextBox ID="txtMinLength" runat="server" />
                <p><asp:Label CssClass="EditionPage" AssociatedControlID="ddlValidation" runat="server" Text='<%$ Resources: medianamik_typemanagement, TextMaxLength %>' /></p>
                <asp:TextBox ID="txtMaxLength" runat="server" />
            </asp:PlaceHolder>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>